home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5453 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: news.princeton.edu!blume
  2. From: blume@zayin.cs.princeton.edu (Matthias Blume)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: void main() and other atrocities!
  5. Date: 09 Feb 1996 21:42:15 GMT
  6. Organization: Princeton University
  7. Distribution: world
  8. Message-ID: <BLUME.96Feb9164215@zayin.cs.princeton.edu>
  9. References: <4eduaj$1aq@grouper.Exis.Net> <9602021300.AA04359@dxmint.cern.ch>
  10.     <4f2rahINNmud@keats.ugrad.cs.ubc.ca> <4f7ifv$8l4@airdmhor.gen.nz>
  11.     <4fg97qINNnug@keats.ugrad.cs.ubc.ca>
  12. NNTP-Posting-Host: zayin.cs.princeton.edu
  13. In-reply-to: c2a192@ugrad.cs.ubc.ca's message of 9 Feb 1996 12:02:02 -0800
  14.  
  15. In article <4fg97qINNnug@keats.ugrad.cs.ubc.ca> c2a192@ugrad.cs.ubc.ca
  16. (Kazimir Kylheku) writes:
  17.  
  18.    Hence, declaring a void main(), while it is a
  19.    transgression, is not a very serious error.
  20.  
  21. No, no, and no!  It _is_ a serious error.  Don't spread false
  22. information, please!  The C compiler is free to generate different
  23. function *calling* (as opposed to "return") sequences for functions
  24. declared as returning void and returning int.  In this case already
  25. the call to a "void" main can break something.
  26.  
  27. Why, on earth, is it so hard to accept the fact that declaring main as
  28. returning anything other than int in a hosted environment is ILLEGAL?
  29. It *is* illegal.  Period.
  30.  
  31. --
  32. -Matthias
  33.